/**
 * @desc 查询飞书文档的所有块
 */
import { axios } from '@/plugins/axios';

export function useGetLarkBlocks() {
  const getLarkBlocks = (
    /** 文档的唯一标识 */
    documentId: string,
  ): Promise<Array<note.CnBlock>> => {
    return axios({
      method: 'post',
      url: `/cn-knowledge/notebook/${documentId}/lark-blocks`,
    });
  };
  return { getLarkBlocks };
}
